import request from "./request";

export const registerAccount = (params) => request.post("/register", params);

export const login = (params) => request.post("/login", params);
// 获取文章列表
export const getList = (params) => request.get("/article", { params });

export const addArticle = (data) => request.post("/article/add", data);
// 查看文章
export const getArticleById = (id) => request.get(`/article/${id}`);
// 查看文章
export const deleteArticle  = (id) => request.post(`/article/remove`,{id});

export const getUserInfo  = () => request.get(`/info`);
export const updateUserInfo  = (data) => request.put(`/info`,data);
